﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CR.ErrorCode
{
    /// <summary>
    /// API错误码枚举
    /// </summary>
    public enum ApiEnums
    {
        /// <summary>
        /// 成功
        /// </summary>
        Success = 0,
        
        /// <summary>
        /// 系统错误
        /// </summary>
        SystemError = 500,
        
        /// <summary>
        /// 参数错误
        /// </summary>
        ParameterError = 400,
        
        /// <summary>
        /// 请求错误
        /// </summary>
        BadRequest = 400,
        
        /// <summary>
        /// 未授权
        /// </summary>
        Unauthorized = 401,
        
        /// <summary>
        /// 禁止访问
        /// </summary>
        Forbidden = 403,
        
        /// <summary>
        /// 资源不存在
        /// </summary>
        NotFound = 404,
        
        /// <summary>
        /// 用户不存在
        /// </summary>
        UserNotFound = 1001,
        
        /// <summary>
        /// 用户已存在
        /// </summary>
        UserExists = 1002,
        
        /// <summary>
        /// 密码错误
        /// </summary>
        PasswordError = 1003,
        
        /// <summary>
        /// 用户已锁定
        /// </summary>
        UserLocked = 1004,
        
        /// <summary>
        /// 邮箱已存在
        /// </summary>
        EmailExists = 1005,
        
        /// <summary>
        /// 验证码错误
        /// </summary>
        CaptchaError = 1006,
        
        /// <summary>
        /// 需要验证码
        /// </summary>
        CaptchaRequired = 1007,
        
        /// <summary>
        /// 令牌无效
        /// </summary>
        InvalidToken = 1008,
        
        /// <summary>
        /// 令牌过期
        /// </summary>
        TokenExpired = 1009,
        
        /// <summary>
        /// 数据已存在
        /// </summary>
        DataExists = 2001,
        
        /// <summary>
        /// 数据不存在
        /// </summary>
        DataNotFound = 2002,
        
        /// <summary>
        /// 操作失败
        /// </summary>
        OperationFailed = 2003,
        Fail = 2004,
    }
}
